﻿// --------------------------------------------------------------------------------------------------------------------
// <copyright file="Class1.cs" company="xmldoc-reflector team">
//
// xmldoc-reflector, a library to access the XML code documentation of .NET assemblies
// Copyright (C) 2012 xmldoc-reflector team
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program.  If not, see http://www.gnu.org/licenses/. 
// </copyright>
// <author>
//   <name>Roland Reinl</name>
//   <mail>reinlroland@googlemail.com</mail>
// </author>
// <history>
//   <historyitem date="2012-10-27" change="Created file"/>
// </history>
// 
// --------------------------------------------------------------------------------------------------------------------
namespace XmlDocReflectorTest
{
  using System.Reflection;
  using NUnit.Framework;
  using XmlDocReflectorLib;

  /// <summary>
  /// Test class.
  /// </summary>
  public class Class1
  {
    /// <summary>
    /// Gets or sets the test property.
    /// </summary>
    /// <value>
    /// The test property.
    /// </value>
    public int TestProperty { get; set; }

    /// <summary>
    /// Tests the case1.
    /// </summary>
    [Test]
    public void TestCase1()
    {
      PropertyInfo test = this.GetType().GetProperty("TestProperty");
#if DOTNET20
      Assert.AreEqual("\r\n            Gets or sets the test property.\r\n            ", XmlDocReflector.GetXmlDoc(test).Summary.InnerText);
#else
      Assert.AreEqual("\r\n            Gets or sets the test property.\r\n            ", test.GetXmlDoc().Summary.InnerText);
#endif
    }
  }
}
